package org.flexharmony.eclipse.properties;

import static org.flexharmony.eclipse.properties.PropertiesConstants.*;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.flexharmony.eclipse.HarmonyPlugin;

public class PreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage
{
  private StringFieldEditor flexSrcDirEditor;
  
  private BooleanFieldEditor additiveSyncEditor;

  public PreferencesPage()
  {
    super();
    
    setPreferenceStore(HarmonyPlugin.getInstance().getPreferenceStore());
  }

  public void init(IWorkbench workbench)
  {
    
  }
  
  public void createFieldEditors()
  {
    flexSrcDirEditor = new StringFieldEditor(FLEX_SRC_DIR_NAME, 
        "Default Flex Source Directory:", getFieldEditorParent());
    addField(flexSrcDirEditor);
    
    additiveSyncEditor = new BooleanFieldEditor(ADDITIVE_SYNC, 
        "Default Additive Synchronization Only", getFieldEditorParent());
    addField(additiveSyncEditor);
  }
}
